const fs = require('fs')
const path = require('path')
fs.readFile(path.join(__dirname,'字典.txt'),'utf8', (err,data)=>{
    if (err) {
        console.log('读取err: ',err)
        return
    }
    let content = []
    data.split(' ').forEach(item=>{
        content.push(item.replace('=',' : '))
    })
    fs.writeFile(path.join(__dirname,'字典-ok.txt'),content.join('\r\n'),'utf8', err=>{
        if (err) {
            console.log('写入err: ',err)
            return
        }
        console.log('write success')
    })
})
